#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
flask 路由配置
Attributes:
    __version__ (str): "0.0.1"
    __copyright__ (str): "Copyright (C) 2025 z"
    __license__ (str): "MIT"
    __author__ (str): "Z"
"""

# from __future__ import print_function, unicode_literals, absolute_import, division

from webhook import (
    dispatch, get_prometheus,
    get_elastalert_nginx, get_elastalert_nginx_error,
    get_elastalert_syslog,
    get_elastalert_java_info, get_elastalert_java_error,
    get_elastalert_mysql_slow, get_elastalert_mysql_error,
    fluendbit_systemd, fluendbit_kubernetes, fluendbit_logs, fluendbit_docker
)

routes = {
    "/webhook/talkrobot": dispatch,

    "/webhook/prometheus": get_prometheus,

    "/webhook/elastalert_nginx": get_elastalert_nginx,
    "/webhook/elastalert_nginx_error": get_elastalert_nginx_error,
    # "/webhook/elastalert_modsec": get_elastalert_modsec,

    "/webhook/elastalert_syslog": get_elastalert_syslog,

    "/webhook/elastalert_java_info": get_elastalert_java_info,
    "/webhook/elastalert_java_error": get_elastalert_java_error,

    "/webhook/elastalert_mysql_slow": get_elastalert_mysql_slow,
    "/webhook/elastalert_mysql_error": get_elastalert_mysql_error,
    # "/webhook/elastalert_redis_error": get_elastalert_redis_error,

    "/webhook/systemd": fluendbit_systemd,
    "/webhook/kubernetes": fluendbit_kubernetes,
    "/webhook/logs": fluendbit_logs,
    "/webhook/docker": fluendbit_docker,

}
